// 本地存储方式
// 整个项目都使用localStorage
// 现在现象: 散落在各个逻辑页面里
// 封装统一本地存储方式, 为了以后修改(维护)
export const setStorage = (key, value) => {
  localStorage.setItem(key, value)
}
export const getStorage = (key) => {
  return localStorage.getItem(key)
}
export const removeStorage = (key) => {
  localStorage.removeItem(key)
}
export const clearStorage = () => {
  localStorage.clear()
}
// 外面即可按需导入, 也可以直接默认导入所有对象
// import * as obj from '此文件'

export default {
  setStorage,
  getStorage,
  removeStorage,
  clearStorage
}
